﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BLO;

namespace QuanLyBanHang
{
    public partial class frmBaoCaoDSHoaDon : Form
    {
        public frmBaoCaoDSHoaDon()
        {
            InitializeComponent();
        }

        private void btnThoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnTim_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(cbbNCC.SelectedValue.ToString()))
                return;
            string mancc = cbbNCC.SelectedValue.ToString();
            dgvResult.DataSource = new HoaDonNhap_Blo().GetHoaDons(mancc).Tables[0];
        }

        private void frmBaoCaoDSHoaDon_Load(object sender, EventArgs e)
        {
            Utility.ComboboxUlt.LoadData(new NhaCungCap_Blo().GetAllObject(), cbbNCC, new[] { "TenNCC", "MaNCC" }, "Chọn nhà cung cấp");
        }
    }
}
